package com.bokey.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.bokey.entity.Node;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【node】的数据库操作Mapper
* @createDate 2022-11-17 12:47:43
* @Entity com.bokey.entity.Node
*/
public interface NodeMapper extends BaseMapper<Node> {

    @Select("select n.* from follow f,node n where f.beFollowerId = n.user_id and f.followerId = #{followerId} ORDER BY time desc " )
    IPage<Node> findBeFollowerNodeByFollowerId(IPage<Node> page,Integer followerId);

}




